<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TablesNew.ascx.cs" Inherits="Framework.Portal.Administrator.Database.TablesNew" %>
<div>
<asp:UpdatePanel ID="upanelGridUserManagemt" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:Literal ID="ltlJavascriptDataType" runat="server"></asp:Literal>
<asp:Label ID="lblError" runat="server" Visible="false" SkinID="error"></asp:Label>
    <table border="0" cellpadding="0" cellspacing="1" width="100%" class="content">
        <tr>
            <td class="header2" align="left" colspan="2">Table</td>
        </tr>
        <tr>
            <td class="post" align="left" width="25%">
                <asp:Label ID="lblDropOwner" runat="server" Text="Owner"></asp:Label>
            </td>
            <td class="postheader" align="left" width="75%">
                <asp:DropDownList ID="dropOwner" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="post" align="left" width="25%">
                <asp:Label ID="lblTxtTableName" runat="server" Text="TableName"></asp:Label>
            </td>
            <td class="postheader" align="left" width="75%">
                <asp:TextBox ID="txtTableName" runat="server" Columns="40"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldtxtTableName" runat="server" ControlToValidate="txtTableName"
                    Display="Dynamic" ErrorMessage="*" SkinID="error" ValidationGroup="table"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="post" align="left" width="25%">
                <asp:Label ID="lblDropFileGroup" runat="server" Text="FileGroup"></asp:Label>
            </td>
            <td class="postheader" align="left" width="75%">
                <asp:DropDownList ID="dropFileGroup" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="postfooter" colspan="2" align="left">
                <asp:Button ID="btnCreate" runat="server" CssClass="pbutton" Text="Create" OnClick="btnCreate_Click" ValidationGroup="table" />
            </td>
        </tr>
    </table>
<br />
<table border="0" cellpadding="0" cellspacing="1" width="100%" class="content">
    <tr>
        <td class="header2" align="left" colspan="6">Column Infomation</td>
    </tr>
    <tr>
        <td class="post" align="left" width="25%">
            <asp:Label ID="lblTxtColumnName" runat="server" Text="ColumnName"></asp:Label></td>
        <td class="postheader" align="left" width="75%" colspan="5">
            <asp:TextBox ID="txtColumnName" runat="server" Columns="40"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldtxtColumnName" runat="server" ControlToValidate="txtColumnName"
                Display="Dynamic" ErrorMessage="*" SkinID="error" ValidationGroup="column"></asp:RequiredFieldValidator></td>
    </tr>
        <tr>
            <td class="post" align="left" width="15%">
                <asp:Label ID="lblDropDataType" runat="server" Text="DataType"></asp:Label></td>
            <td class="postheader" align="left" width="25%">
                <asp:DropDownList ID="dropDataType" runat="server">
                </asp:DropDownList></td>
            <td class="post" align="left" width="15%">
                <asp:Label ID="lblTxtWidth" runat="server" Text="Width"></asp:Label></td>
            <td class="postheader" align="left" width="15%">
                <asp:TextBox ID="txtWidth" runat="server" Columns="10" Enabled="False"></asp:TextBox></td>
            <td class="post" align="left" width="15%">
                <asp:Label ID="lblTxtScale" runat="server" Text="Scale"></asp:Label></td>
            <td class="postheader" align="left" width="15%">
                <asp:TextBox ID="txtScale" runat="server" Columns="10" Enabled="False"></asp:TextBox></td>
        </tr>        
        <tr>
            <td class="post" align="left" width="40%" colspan="2">
                <asp:CheckBox ID="checkIdentity" runat="server" Text="checkIdentity" AutoPostBack="True" OnCheckedChanged="checkIdentity_CheckedChanged" /></td>            
            <td class="postheader" align="left" width="15%">
                <asp:Label ID="lblTxtSeed" runat="server" Text="Seed"></asp:Label></td>
            <td class="post" align="left" width="15%">
                <asp:TextBox ID="txtSeed" runat="server" Columns="10" Enabled="False">1</asp:TextBox></td>
            <td class="postheader" align="left" width="15%">
                <asp:Label ID="lblTxtIncrement" runat="server" Text="Increment"></asp:Label></td>
            <td class="post" align="left" width="15%">
                <asp:TextBox ID="txtIncrement" runat="server" Columns="10" Enabled="False">1</asp:TextBox></td>
        </tr>
        <tr>
            <td class="post" align="left" width="25%">
                <asp:Label ID="lblRadioNull" runat="server" Text="Allow Null"></asp:Label></td>
            <td class="postheader" align="left" width="75%" colspan="5">
                <asp:RadioButtonList ID="radioNull" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                    <asp:ListItem Value="true" Selected="True" Text="True"></asp:ListItem>
                    <asp:ListItem Value="false" Text="False"></asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="post" align="left" width="25%">
                <asp:Label ID="lblTxtDefault" runat="server" Text="Default"></asp:Label></td>
            <td class="postheader" align="left" width="75%" colspan="5">
                <asp:TextBox ID="txtDefault" runat="server" Columns="10"></asp:TextBox></td>
        </tr>
        <tr>
            <td class="post" align="left" width="25%">
                <asp:Label ID="lblDropDefaults" runat="server" Text="Drop Default"></asp:Label></td>
            <td class="postheader" align="left" width="75%" colspan="5">
                <asp:DropDownList ID="dropDefaults" runat="server">
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td class="post" align="left" width="25%">
                <asp:Label ID="lblDropRules" runat="server" Text="Drop Rule"></asp:Label>
            </td>
            <td class="postheader" align="left" width="75%" colspan="5">
                <asp:DropDownList ID="dropRules" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="postfooter" colspan="6" align="left">
                <asp:Button ID="btnAdd" CssClass="pbutton" runat="server" Text="Add" OnClick="btnAdd_Click" ValidationGroup="column" />
                <asp:Button ID="btnUpdate" CssClass="pbutton" runat="server" Text="Update" OnClick="btnUpdate_Click" Visible="False" ValidationGroup="column" />
                <asp:HiddenField ID="hideRowUpdate" runat="server" />
            </td>
        </tr>
    </table>
    <br />
    <asp:GridView ID="gridColumns" BorderColor="white"  runat="server" AutoGenerateColumns="False" OnRowDeleting="gridColumns_RowDeleting" OnRowEditing="gridColumns_RowEditing" Width="100%" CssClass="content">
        <Columns>
            <asp:BoundField HeaderText="Name" DataField="name" ItemStyle-CssClass="post" HtmlEncode="False"></asp:BoundField>
            <asp:BoundField HeaderText="Data Type" DataField="datatype" ItemStyle-CssClass="postheader" HtmlEncode="False"></asp:BoundField>
            <asp:BoundField HeaderText="width" DataField="width" ItemStyle-CssClass="post" SortExpression="width" HtmlEncode="False"></asp:BoundField>
            <asp:BoundField HeaderText="scale" DataField="scale" ItemStyle-CssClass="postheader" SortExpression="scale" HtmlEncode="False"></asp:BoundField>
            <asp:BoundField HeaderText="identity" HtmlEncode="False" ItemStyle-CssClass="post" DataField="identity" SortExpression="identity"></asp:BoundField>
            <asp:BoundField HeaderText="seed" HtmlEncode="False" ItemStyle-CssClass="postheader" DataField="seed" SortExpression="seed"></asp:BoundField>
            <asp:BoundField HeaderText="increment" HtmlEncode="False" ItemStyle-CssClass="post" DataField="increment" SortExpression="increment"></asp:BoundField>
            <asp:BoundField HeaderText="default" HtmlEncode="False" ItemStyle-CssClass="postheader" DataField="default" SortExpression="default"></asp:BoundField>
            <asp:BoundField HeaderText="defaultbinding" HtmlEncode="False" ItemStyle-CssClass="post" DataField="defaultbinding" SortExpression="defaultbinding"></asp:BoundField>
            <asp:BoundField HeaderText="ruleBinding" DataField="ruleBinding" ItemStyle-CssClass="postheader" SortExpression="ruleBinding" HtmlEncode="False"></asp:BoundField>
            <asp:BoundField HeaderText="isnull" DataField="isnull" ItemStyle-CssClass="post" SortExpression="isnull"></asp:BoundField>
            <asp:CommandField ShowEditButton="True" EditText="Edit" ItemStyle-CssClass="postheader">
            </asp:CommandField>
            <asp:CommandField ShowDeleteButton="True" DeleteText="Drop" ItemStyle-CssClass="post">
            </asp:CommandField>
        </Columns>
        <HeaderStyle CssClass="header2" Height="27" />
        <AlternatingRowStyle CssClass="post" />
    </asp:GridView>
<asp:Literal ID="ltlExecuteJavascript" runat="server"></asp:Literal>
</ContentTemplate>
</asp:UpdatePanel>
</div>